const { WebSocketServer } = require("ws");

const { createServer } = require("http");

const server = createServer({});
const wss = new WebSocketServer({ server: server });

wss.on("connection", function connection(ws, req) {
    ws.on("message", function message(data) {
        console.log(`${req.socket.remoteAddress}| ${data}`);
    });
});

console.log("WebLogger is successfully launched");
server.listen(9596);
